import 'package:flutter/material.dart';

class CategoryPage extends StatefulWidget {
  CategoryPage({Key? key}) : super(key: key);

  @override
  _CategoryPageState createState() => _CategoryPageState();
}

class _CategoryPageState extends State<CategoryPage> {
  @override
  Widget build(BuildContext context) {
    return DefaultTabController(
      length: 12,
      child: Scaffold(
          appBar: AppBar(
            title: Row(
              children: [
                Expanded(
                  child: TabBar(
                    isScrollable: true,
                    indicatorColor: Colors.black,
                    labelColor: Colors.red,
                    unselectedLabelColor: Colors.white,
                    tabs: [
                      Tab(
                        text: "one",
                      ),
                      Tab(
                        text: "two",
                      ),
                      Tab(
                        text: "one",
                      ),
                      Tab(
                        text: "two",
                      ),
                      Tab(
                        text: "one",
                      ),
                      Tab(
                        text: "two",
                      ),
                      Tab(
                        text: "one",
                      ),
                      Tab(
                        text: "two",
                      ),
                      Tab(
                        text: "one",
                      ),
                      Tab(
                        text: "two",
                      ),
                      Tab(
                        text: "one",
                      ),
                      Tab(
                        text: "two",
                      ),
                    ],
                  ),
                )
              ],
            ),
          ),
          body: TabBarView(
            children: [
              ListView(
                children: [
                  ListTile(
                    title: Text("one"),
                  ),
                  ListTile(
                    title: Text("one"),
                  ),
                  ListTile(
                    title: Text("one"),
                  ),
                  ListTile(
                    title: Text("one"),
                  ),
                ],
              ),
              ListView(
                children: [
                  ListTile(
                    title: Text("tow"),
                  ),
                  ListTile(
                    title: Text("tow"),
                  ),
                  ListTile(
                    title: Text("tow"),
                  ),
                  ListTile(
                    title: Text("tow"),
                  ),
                ],
              ),
              ListView(
                children: [
                  ListTile(
                    title: Text("one"),
                  ),
                  ListTile(
                    title: Text("one"),
                  ),
                  ListTile(
                    title: Text("one"),
                  ),
                  ListTile(
                    title: Text("one"),
                  ),
                ],
              ),
              ListView(
                children: [
                  ListTile(
                    title: Text("tow"),
                  ),
                  ListTile(
                    title: Text("tow"),
                  ),
                  ListTile(
                    title: Text("tow"),
                  ),
                  ListTile(
                    title: Text("tow"),
                  ),
                ],
              ),
              ListView(
                children: [
                  ListTile(
                    title: Text("one"),
                  ),
                  ListTile(
                    title: Text("one"),
                  ),
                  ListTile(
                    title: Text("one"),
                  ),
                  ListTile(
                    title: Text("one"),
                  ),
                ],
              ),
              ListView(
                children: [
                  ListTile(
                    title: Text("tow"),
                  ),
                  ListTile(
                    title: Text("tow"),
                  ),
                  ListTile(
                    title: Text("tow"),
                  ),
                  ListTile(
                    title: Text("tow"),
                  ),
                ],
              ),
              ListView(
                children: [
                  ListTile(
                    title: Text("one"),
                  ),
                  ListTile(
                    title: Text("one"),
                  ),
                  ListTile(
                    title: Text("one"),
                  ),
                  ListTile(
                    title: Text("one"),
                  ),
                ],
              ),
              ListView(
                children: [
                  ListTile(
                    title: Text("tow"),
                  ),
                  ListTile(
                    title: Text("tow"),
                  ),
                  ListTile(
                    title: Text("tow"),
                  ),
                  ListTile(
                    title: Text("tow"),
                  ),
                ],
              ),
              ListView(
                children: [
                  ListTile(
                    title: Text("one"),
                  ),
                  ListTile(
                    title: Text("one"),
                  ),
                  ListTile(
                    title: Text("one"),
                  ),
                  ListTile(
                    title: Text("one"),
                  ),
                ],
              ),
              ListView(
                children: [
                  ListTile(
                    title: Text("tow"),
                  ),
                  ListTile(
                    title: Text("tow"),
                  ),
                  ListTile(
                    title: Text("tow"),
                  ),
                  ListTile(
                    title: Text("tow"),
                  ),
                ],
              ),
              ListView(
                children: [
                  ListTile(
                    title: Text("one"),
                  ),
                  ListTile(
                    title: Text("one"),
                  ),
                  ListTile(
                    title: Text("one"),
                  ),
                  ListTile(
                    title: Text("one"),
                  ),
                ],
              ),
              ListView(
                children: [
                  ListTile(
                    title: Text("tow"),
                  ),
                  ListTile(
                    title: Text("tow"),
                  ),
                  ListTile(
                    title: Text("tow"),
                  ),
                  ListTile(
                    title: Text("tow"),
                  ),
                ],
              ),
            ],
          )),
    );
  }
}
